package com.example.pageability.slice;

import com.example.pageability.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import ohos.agp.components.Text;

public class OtherPageAbiltySlice extends AbilitySlice {
    Text text;
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_other);

        text = (Text) findComponentById(ResourceTable.Id_text_helloworld);
        text.setText(intent.getStringParam("title"));

        text.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
//                terminate();
            }
        });
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
